<%@page import="java.util.ArrayList"%>
<%@page import="com.jlrdb.model.TvBroadcast"%>
<%@page import="com.jlrdb.model.TvBroadcasts"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>View TV Broadcasts</title>
<link rel="stylesheet" type="text/css" href="/css/report.css">
</head>
<body>
	<%
		TvBroadcasts tvBroadcasts = (TvBroadcasts) request.getAttribute("tvBroadcasts");
		HttpSession session1 = request.getSession();
		String role = (String) session1.getAttribute("Role");
	%>
	<h3>
		Geographic Region: <font color="blue"><%=tvBroadcasts.getTvBroadcasts().get(0).getGeographic_Region()%></font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Country: <font color="blue"><%=tvBroadcasts.getTvBroadcasts().get(0).getCountry()%></font>
	</h3>
	<%
		if (role.equalsIgnoreCase("Admin"))
		{
	%>
	<p>
		<font color="red">click on UPDATE DETAILS to update data.</font>
	</p>
	<%
		}
	%>
	<%
		for (TvBroadcast tvBroadcast : tvBroadcasts.getTvBroadcasts())
		{
	%>
	<div id="content">
		<%
			if (role.equalsIgnoreCase("Admin"))
				{
		%>
		<p align="center">
			<a href="/TvBroadcastServlet?action=getThisBroadcast&&broadcastId=<%=tvBroadcast.getBroadcastId()%>">UPDATE DETAILS</a>
		</p>
		<%
			}
		%><br>
		<table style="float: left; position: relative; margin-right: auto; width: 45%;">
			<tr>
				<th>DTT Standard:</th>
				<td><%=tvBroadcast.getDtt_Standard()%></td>
			</tr>
			<tr>
				<th>DTT Status:</th>
				<td><%=tvBroadcast.getDtt_Status()%></td>
			</tr>
			<tr>
				<th>Analog Standard:</th>
				<td><%=tvBroadcast.getAnalog_Standard()%></td>
			</tr>
			<tr>
				<th>ASO Date Start::</th>
				<td><%=tvBroadcast.getAso_Date_Start()%></td>
			</tr>
			<tr>
				<th>ASO Date Completion:</th>
				<td><%=tvBroadcast.getAso_Date_Completion()%></td>
			</tr>
			<tr>
				<th>ASO Status:</th>
				<td><%=tvBroadcast.getAso_Status()%></td>
			</tr>
			<tr>
				<th>DSO Date Start:</th>
				<td><%=tvBroadcast.getDso_Date_Start()%></td>
			</tr>
			<tr>
				<th>DSO Date Completion:</th>
				<td><%=tvBroadcast.getAso_Date_Completion()%></td>
			</tr>
			<tr>
				<th>DSO Status:</th>
				<td><%=tvBroadcast.getDso_Status()%></td>
			</tr>
			<tr>
				<th>Next Transition Planned:</th>
				<td><%=tvBroadcast.getNext_Transition_Planned()%></td>
			</tr>
			<tr>
				<th>Standard Transition Into:</th>
				<td><%=tvBroadcast.getStandard_Transition_Into()%></td>
			</tr>
			<tr>
				<th>Status:</th>
				<td><%=tvBroadcast.getStatus()%></td>
			</tr>
			<tr>
				<th>Start Date:</th>
				<td><%=tvBroadcast.getStart_Date()%></td>
			</tr>
			<tr>
				<th>Notes:</th>
				<td><%=tvBroadcast.getNotes()%></td>
			</tr>
			<tr>
				<th>Status Confirmed:</th>
				<td><%=tvBroadcast.getStatus_Confirmed()%></td>
			</tr>
			<tr>
				<th>Last Date Verified:</th>
				<td><%=tvBroadcast.getLast_Date_Verified()%></td>
			</tr>
			<tr>
				<th>Video Format Supported:</th>
				<td><%=tvBroadcast.getVideo_Format_Supported()%></td>
			</tr>
		</table>
		<table style="position: relative; width: 45%;">
			<tr>
				<th>Operators:</th>
				<td><%=tvBroadcast.getOperators()%></td>
			</tr>
			<tr>
				<th>MUX Details:</th>
				<td><%=tvBroadcast.getMux_Details()%></td>
			</tr>
			<tr>
				<th>DTT Coverage:</th>
				<td><%=tvBroadcast.getDtt_Coverage()%></td>
			</tr>
			<tr>
				<th>HD Present:</th>
				<td><%=tvBroadcast.getHd_Present()%></td>
			</tr>
			<tr>
				<th>Audio Formats:</th>
				<td><%=tvBroadcast.getAudio_Formats()%></td>
			</tr>
			<tr>
				<th>Frequency Bands:</th>
				<td><%=tvBroadcast.getFrequency_Bands()%></td>
			</tr>
			<tr>
				<th>Interactive Standards:</th>
				<td><%=tvBroadcast.getInteractive_Standards()%></td>
			</tr>
			<tr>
				<th>Channel Bandwidth:</th>
				<td><%=tvBroadcast.getChannel_Bandwidth()%></td>
			</tr>
			<tr>
				<th>Carrier Type:</th>
				<td><%=tvBroadcast.getCarrier_Type()%></td>
			</tr>
			<tr>
				<th>Modulation:</th>
				<td><%=tvBroadcast.getModulation()%></td>
			</tr>
			<tr>
				<th>Broadcast Authority:</th>
				<td><%=tvBroadcast.getBroadcast_Authority()%></td>
			</tr>
			<tr>
				<th>ITU Region:</th>
				<td><%=tvBroadcast.getItu_Region()%></td>
			</tr>
			<tr>
				<th>Broadcasters:</th>
				<td><%=tvBroadcast.getBroadcasters()%></td>
			</tr>
			<tr>
				<th>Source Of Reference:</th>
				<td>
					<%
						String full = tvBroadcast.getSource_Of_Reference();
							String parts[] = full.split("[\\r\\n]+");
							for (String s : parts)
							{
								if (s.contains("http"))
								{
					%>
					<p>
						<a href="<%=s%>" target="_blank"><%=s%></a>
					</p> <%
 	} else
 			{
 %>
					<p><%=s%></p> <%
 	}
 		}
 %>
				</td>
			</tr>
		</table>
	</div>
	<br>
	<%
		}
	%>
</body>
</html>